package com.hyt.it.ogt.pj.enums;

/**
 * 试卷小题主客观标识枚举
 */
public enum PaperItemViewPointEnums {

    OBJECTIVE_TYPE(1, "客观题题型"),
    SUBJECTIVE_TYPE(0, "主观题题型"),

    ;
    private Integer type;
    private String desc;

    PaperItemViewPointEnums(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static PaperItemViewPointEnums getEnumByCode(Integer type) {
        for (PaperItemViewPointEnums paperItemViewPointEnums : PaperItemViewPointEnums.values()) {
            if (paperItemViewPointEnums.getType().equals(type)) {
                return paperItemViewPointEnums;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }


    public String getDesc() {
        return desc;
    }
}
